package cate.game.role.farm.spicefb.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBSpiceFb;

@ClientMsg(title = "领取章节每日奖励的请求")
@OperationSetter(GDOperation.SPICE_FB_DAILY_RWD)
public class GetSpiceFbDailyRewardReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getFarm().spiceFb.getDailyReward();
        if (!r.ok()) {
            game.notice.message(cc.getRole(), r);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBSpiceFb.DAILY_REWARD_REQ;
    }
}
